home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 March / PCWorld_2008-03_cd.bin / v cisle / mediacoder / MediaCoder-0.6.1.4045.exe / htdocs / prefs / value.xsl < prev   
Extensible Markup Language  |  2007-05-14  |  2KB  |  80 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="xml" encoding="utf-8" doctype-public="-//MOZILLA//DTD XUL V1.0//EN"/>
  4. <xsl:template match="/MediaCoderPrefs/node/node/node">
  5.  
  6. <window xmlns:html="http://www.w3.org/1999/xhtml"
  7.         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  8.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  9.         >
  10. <hbox>
  11. <xsl:choose>
  12. <xsl:when test="@type='bool'">
  13.  
  14.     <vbox>
  15.     <radiogroup orient="horizontal">
  16.     <radio label="Yes" oncommand="SaveValue('true')">
  17.     <xsl:if test="value='true'"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
  18.     </radio>
  19.     <radio label="No" oncommand="SaveValue('false')">
  20.     <xsl:if test="value!='true'"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
  21.     </radio>
  22.     </radiogroup>
  23.     </vbox>
  24.     <vbox flex="1"/>
  25.  
  26. </xsl:when>
  27.  
  28. <xsl:when test="@type='enum'">
  29.  
  30.     <vbox>
  31.     <menulist flex="false" oncommand="SaveValue(selectedItem.getAttribute('label'))">
  32.         <menupopup>
  33.             <xsl:for-each select="enum">
  34.             <menuitem>
  35.                 <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
  36.                 <xsl:if test=".=../value"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
  37.             </menuitem>
  38.             </xsl:for-each>
  39.         </menupopup>
  40.     </menulist>
  41.     </vbox>
  42.     <vbox flex="1"/>
  43.  
  44. </xsl:when>
  45.  
  46. <xsl:when test="@type='int' or @type='float'">
  47.  
  48.     <vbox>
  49.     <button label="Apply"/>
  50.     </vbox>
  51.     <vbox>
  52.     <textbox onchange="SaveValue(this.value)" size="8">
  53.     <xsl:attribute name="value"><xsl:value-of select="value"/></xsl:attribute>
  54.     </textbox>
  55.     </vbox>
  56.     <vbox flex="1"/>
  57.  
  58. </xsl:when>
  59.  
  60. <xsl:otherwise>
  61.  
  62.     <vbox>
  63.     <button label="Apply"/>
  64.     </vbox>
  65.     <vbox flex="1">
  66.     <textbox onchange="SaveValue(this.value)">
  67.     <xsl:attribute name="value"><xsl:value-of select="value"/></xsl:attribute>
  68.     </textbox>
  69.     </vbox>
  70.  
  71. </xsl:otherwise>
  72.  
  73. </xsl:choose>    
  74.  
  75. </hbox>
  76.  
  77. </window>
  78. </xsl:template>
  79.  
  80. </xsl:stylesheet>